<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>

    <link th:href="@{/webjars/bootstrap/4.3.1/css/bootstrap.min.css}" rel="stylesheet">
    <script type="text/javascript" th:src="@{/webjars/jquery/3.6.2/jquery.js}"></script>
</head>
<body>
<h1>上传csv文件，生成枚举</h1>
<!--
  样式来源：
      https://blog.csdn.net/qq_39926957/article/details/83991902
  -->
<form class="form-group" th:action="@{/download/customEnum}" method="POST" enctype="multipart/form-data">
    <div class="form-group">
        <div class="col-sm-6">
            <div class="input-group">
                <label for='location'>选择文件&nbsp;&nbsp;</label><input id='location' class="form-control" onclick="$('#i-file').click();">
                <label class="input-group-btn">
                    <input type="button" id="i-check" value="浏览文件" class="btn btn-primary" onclick="$('#i-file').click();">
                </label>
            </div>
        </div>
        <input type="file" name="uploadFile" id='i-file' accept=".csv" onchange="$('#location').val($('#i-file').val());" style="display: none">
    </div>
    <label>
        <input name="customEnumClassName" placeholder="指定你的枚举类名">
    </label>
    <label>
        <input name="fullPackageName" placeholder="指定你的完整包名">
    </label>
    <label>
        <input name="keyIndex" placeholder="从哪一列作为枚举的key值">
    </label>
    <input class="btn btn-success" type="submit" value="上传">
</form>
</body>
</html>